package com.example.night.data.InfluencerOperationRecord;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface InfluencerOperationRecordRepository extends JpaRepository<InfluencerOperationRecord, Long> {

    // 查找所有 operation = -1 的记录
    List<InfluencerOperationRecord> findByOperation(int operation);

    // 查找所有 operation != -1 的记录
    List<InfluencerOperationRecord> findByOperationNot(int operation);

    // 根据 promoteId 和 phone 查找记录
    Optional<InfluencerOperationRecord> findByPromoteIdAndPhone(String promoteId, String phone);
}
